/**
 * @Author Yenchingcheng
 * @Date 2023/5/28 23:26
 * @Description
 **/
public class FruitFactory implements Factory {


    @Override
    public Fruit getFruit(String fruitType) {
        if (fruitType == null) {
            return null;
        }
        if (fruitType.equalsIgnoreCase("apple")) {
            return new Apple();
        } else if (fruitType.equalsIgnoreCase("orange")) {
            return new Orange();
        }
        return null;
    }

    @Override
    public Method getMethod(String methodType) {
        return null;
    }
}
